<template>
  <el-menu
    @open="handleOpen"
    style="height: 100%"
    @close="handleClose"
  >
    <el-sub-menu index="1">
      <template #title>
        <span>送货单</span>
      </template>
      <el-menu-item index="1-1" @click="handleClick('送货单')"
        >送货单</el-menu-item
      >
    </el-sub-menu>
  </el-menu>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
setup(props, context) {
    const handleOpen = (index: string, indexPath: string) => {
      console.log(index + "--" + indexPath);
    };
    const handleClose = (index: string, indexPath: string) => {
      console.log(index + "--" + indexPath);
    };
    const handleClick = (val: string) => {
      context.emit("updateMain", val);
    };
    return { handleOpen, handleClose, handleClick };
  },
});
</script>

<style lang="less" scoped></style>
